package cfsmon.core;

import java.io.OutputStream;

import cfsmon.logic.dfm.IDfm;

public interface Backend {
	
	/**
	 * A call to this method instructs the Backend to compile a given
	 * deterministic finite state machine with event declarations into
	 * an output representation (e.g. C code). The compiled monitor shall
	 * have a certain number of monitor slots and be written to a given
	 * output stream. 
	 * @param dfm The deterministic finite state machine with event declarations
	 * @param out The output stream, the compiled monitor shall be written to
	 * @param monitorSlots The number of monitoring slots that shall be available
	 * @throws Exception If errors occur during the compilation that require a
	 * compilation halt.
	 */
	public void compile(IDfm dfm, OutputStream out, int monitorSlots) throws Exception;
	
}
